import fetch from 'common/src/utils/fetch'
let apiPrefix = '/api/studentservice/';
// 教务员代申请列表
export function getFieldAuth (typeId) {
    return fetch({
        url: apiPrefix + `fieldAuth/selectFieldAuthByTypeId/${typeId}`,
        method: 'get',
    });
}

// 提交异动申请
export function addApply (data = {}) {
    return fetch({
        url: apiPrefix + 'apply/addApply',
        method: 'post',
        data
    });
}

// 保存异动申请
export function saveApply (data = {}) {
    return fetch({
        url: apiPrefix + 'apply/saveApply',
        method: 'post',
        data
    });
}

// 获取学生个人信息
export function getStudentInfo (studentId) {
    return fetch({
        url: apiPrefix + `apply/statusInfo?studentId=${studentId}`,
        method: 'get',
    });
}

// 获取异动详情（根据异动大类id获取具体文字）
export function queryAbnormalApply (data = {}) {
    return fetch({
        url: apiPrefix + 'apply/queryAbnormalApply',
        method: 'post',
        data
    });
}
// 获取异动大类
export function getTransactionCategory () {
    return fetch({
        url: apiPrefix + 'type/getTransactionCategory',
        // url: '/dev/type/getTransactionCategory',
        method: 'get'
    });
}

export function coursesInAbnormalTime (data) {
    return fetch({
        url: apiPrefix + 'apply/coursesInAbnormalTime',
        // url: '/dev/type/getTransactionCategory',
        method: 'post',
        data
    });
}